﻿@model Blogger.UI.Models.Posting
@{
    ViewBag.Title = "EditPosting";
    Layout = "~/Views/Shared/_UILayout.cshtml";
}
<h2>
    EditPosting</h2>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Posting</legend>
      
            @Html.HiddenFor(model => model.BlogID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Category)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Category)
            @Html.ValidationMessageFor(model => model.Category)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Body)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Body, new { rows = 15, cols = 60 })
            @Html.ValidationMessageFor(model => model.Body)
        </div>
        <div class="editor-label">
        </div>
        <div class="editor-field">
            @Html.HiddenFor(model => model.ID)
            @Html.HiddenFor(model => model.User)
            @Html.ValidationMessageFor(model => model.User)
            @Html.HiddenFor(model => model.IP)
            @Html.ValidationMessageFor(model => model.IP)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to Posting List", "Posting", new { id = Model.BlogID }, null)
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script>
    tinymce.init({ selector: 'textarea' });
</script>
